<!DOCTYPE HTML>
<!--
	Forty by HTML5
	jq22.net | @ajlkn
	Free for personal and commercial use under the CCA 3.0 license (jq22.net/license)
-->
<html>
<head>
<title>Forty by HTML5</title>
<meta charset="utf-8" />
<meta name="viewport"
	content="width=device-width, initial-scale=1, user-scalable=no" />
<!--[if lte IE 8]><script src="assets/js/ie/html5shiv.js"></script><![endif]-->
<link rel="stylesheet" href="assets/css/main.css" />
<link rel="stylesheet" type="text/css"
	href="http://www.jq22.com/jquery/font-awesome.4.6.0.css">
<!--[if lte IE 9]><link rel="stylesheet" href="assets/css/ie9.css" /><![endif]-->
<!--[if lte IE 8]><link rel="stylesheet" href="assets/css/ie8.css" /><![endif]-->
</head>
<body>

	<!-- Wrapper -->
	<div id="wrapper">

		<!-- Header -->
		<header id="header" class="alt">
			<a href="index.html" class="logo"><strong>Music</strong> <span>by
					Wan</span></a>
			<nav>
				<a href="#menu">Menu</a>
			</nav>
		</header>

		<!-- Menu -->
		<nav id="menu">
			<ul class="links">
				<li><a href="index.html">Home</a></li>
				<li><a href="landing.html">Landing</a></li>
				<li><a href="generic.html">Generic</a></li>
				<li><a href="elements.html">Elements</a></li>
			</ul>
			<ul class="actions vertical">
				<li><a href="#" class="button special fit">Get Started</a></li>
				<li><a href="#" class="button fit">Log In</a></li>
			</ul>
		</nav>

		<!-- Banner -->
		<section id="banner" class="major">
			<div class="inner">
				<header class="major">
					<h1>
						Hi, my name is <font color="#6495ed">Music</font>
					</h1>
				</header>
				<div class="content">
					<p>
						功能测试按钮<br /> Function test button.Clicking on it
					</p>
					<ul class="actions">
						<li><a href="javascript:;" class="button next scrolly"
							onclick="getMusic()">Get Music</a></li>
					</ul>
				</div>
			</div>
		</section>

		<!-- Main -->
		<div id="main">

			<!-- One -->
			<section id="one" class="tiles">
				<article>
					<span class="image"> <img src="images/pic01.jpg" alt="" />
					</span>
					<header class="major">
						<h3>
							<a href="landing.html" class="link">Aliquam</a>
						</h3>
						<p>Ipsum dolor sit amet</p>
					</header>
				</article>
				<article>
					<span class="image"> <img src="images/pic02.jpg" alt="" />
					</span>
					<header class="major">
						<h3>
							<a href="landing.html" class="link">Tempus</a>
						</h3>
						<p>feugiat amet tempus</p>
					</header>
				</article>
				<article>
					<span class="image"> <img src="images/pic03.jpg" alt="" />
					</span>
					<header class="major">
						<h3>
							<a href="landing.html" class="link">Magna</a>
						</h3>
						<p>Lorem etiam nullam</p>
					</header>
				</article>
				<article>
					<span class="image"> <img src="images/pic04.jpg" alt="" />
					</span>
					<header class="major">
						<h3>
							<a href="landing.html" class="link">Ipsum</a>
						</h3>
						<p>Nisl sed aliquam</p>
					</header>
				</article>
				<article>
					<span class="image"> <img src="images/pic05.jpg" alt="" />
					</span>
					<header class="major">
						<h3>
							<a href="landing.html" class="link">Consequat</a>
						</h3>
						<p>Ipsum dolor sit amet</p>
					</header>
				</article>
				<article>
					<span class="image"> <img src="images/pic06.jpg" alt="" />
					</span>
					<header class="major">
						<h3>
							<a href="landing.html" class="link">Etiam</a>
						</h3>
						<p>Feugiat amet tempus</p>
					</header>
				</article>
			</section>

			<!-- Two -->
			<section id="two">
				<div class="inner">
					<header class="major">
						<h2>Massa libero</h2>
					</header>
					<p>Nullam et orci eu lorem consequat tincidunt vivamus et
						sagittis libero. Mauris aliquet magna magna sed nunc rhoncus
						pharetra. Pellentesque condimentum sem. In efficitur ligula tate
						urna. Maecenas laoreet massa vel lacinia pellentesque lorem ipsum
						dolor. Nullam et orci eu lorem consequat tincidunt. Vivamus et
						sagittis libero. Mauris aliquet magna magna sed nunc rhoncus amet
						pharetra et feugiat tempus.</p>
					<ul class="actions">
						<li><a href="landing.html" class="button next">Get
								Started</a></li>
					</ul>
				</div>
			</section>

		</div>

		<!-- Contact -->
		<section id="contact">
			<div class="inner">
				<section>
					<form method="post" action="#">
						<div class="field half first">
							<label for="name">Name</label> <input type="text" name="name"
								id="name" />
						</div>
						<div class="field half">
							<label for="email">Email</label> <input type="text" name="email"
								id="email" />
						</div>
						<div class="field">
							<label for="message">Message</label>
							<textarea name="message" id="message" rows="6"></textarea>
						</div>
						<ul class="actions">
							<li><input type="submit" value="Send Message"
								class="special" /></li>
							<li><input type="reset" value="Clear" /></li>
						</ul>
					</form>
				</section>
				<section class="split">
					<section>
						<div class="contact-method">
							<span class="icon alt fa-envelope"></span>
							<h3>Email</h3>
							<a href="#">information@untitled.tld</a>
						</div>
					</section>
					<section>
						<div class="contact-method">
							<span class="icon alt fa-phone"></span>
							<h3>Phone</h3>
							<span>(000) 000-0000 x12387</span>
						</div>
					</section>
					<section>
						<div class="contact-method">
							<span class="icon alt fa-home"></span>
							<h3>Address</h3>
							<span>1234 Somewhere Road #5432<br /> Nashville, TN 00000<br />
								United States of America
							</span>
						</div>
					</section>
				</section>
			</div>
		</section>

		<!-- Footer -->
		<footer id="footer">
			<div class="inner">
				<ul class="icons">
					<li><a href="#" class="icon alt fa-twitter"><span
							class="label">Twitter</span></a></li>
					<li><a href="#" class="icon alt fa-facebook"><span
							class="label">Facebook</span></a></li>
					<li><a href="#" class="icon alt fa-instagram"><span
							class="label">Instagram</span></a></li>
					<li><a href="#" class="icon alt fa-github"><span
							class="label">GitHub</span></a></li>
					<li><a href="#" class="icon alt fa-linkedin"><span
							class="label">LinkedIn</span></a></li>
				</ul>
				<ul class="copyright">
					<li>&copy; Untitled</li>
					<li>Design: <a href="#">HTML5</a></li>

				</ul>
			</div>
		</footer>

	</div>

	<!-- Scripts -->
	<script src="assets/js/jquery.min.js"></script>
	<script src="assets/js/jquery.scrolly.min.js"></script>
	<script src="assets/js/jquery.scrollex.min.js"></script>
	<script src="assets/js/skel.min.js"></script>
	<script src="assets/js/util.js"></script>
	<!--[if lte IE 8]><script src="assets/js/ie/respond.min.js"></script><![endif]-->
	<script src="assets/js/main.js"></script>
</body>
<script>
		/* function getMusic() {
            $.ajax({
                type:"post",
                url:"piano/getPiano",
                dataType:'json',
                data:{},
                success:function(res){
                    var AllKeys = res.AllKeys;
                    var LSong = res.LSong;
                    var RSong = res.RSong;
                    ite(RSong);
                    ite(LSong);
				}
            });

        }
        function ite(song) {
            for(let i = 0 ; i < song.length; i++){
                setTimeout(function () {
                    var daxiao = "music/Piano/mp3/" + song[i].key + ".mp3";
                    var audio = new Audio(daxiao);
                    audio .play(); //播放
                },song[i].time)
            }
        } */
        
        function getMusic() {
            $.ajax({
                type:"post",
                url:"piano/getPiano",
                dataType:'json',
                data:{},
                success:function(res){
                    var AllKeys = res.data;
                    for(let i = 0 ; i < AllKeys.length; i++){
	              		setTimeout(function () {
	              			if(0 == AllKeys[i].key){
	              				var daxiao = undefined;
	              			}else{
	              				var daxiao = "music/Piano/mp3/" + AllKeys[i].key + ".mp3";
	              			}
		                    var audio = new Audio(daxiao);
		                    audio .play(); //播放
	               		 },AllKeys[i].time)
           	 }
                  
                    
				}
            });

        }
	</script>
</html>